* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  touch-action: none;  /* 禁止所有触摸行为 */
}

/* rem适配：基准为iPhone 6/7/8的375px宽度，1rem = 100px */
html {
  font-size: calc(100vw / 3.75);
  /* 禁止字体自动调整大小 */
  -webkit-text-size-adjust: 100%;
  /* 优化字体渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
}

/* 防止在大屏设备上字体过大 */
@media screen and (min-width: 750px) {
  html {
    font-size: 100px;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  line-height: 1.2;
  height: 100%;
  width: 100%;
  position: fixed;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;  /* 禁止所有触摸行为 */
}

#root {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
}

/* 移动端点击高亮优化 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 禁止长按菜单 */
* {
  -webkit-touch-callout: none;
  user-select: none;
}

/* 允许特定元素的文本选择 */
input, textarea {
  user-select: text;
}

/* 设置基准字体大小，方便计算 */
:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --font-size-base: 37.5px;  /* 基准字体大小 */
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
